package us.gaaoc.framework.webapp.backingbeans.agent.reports;

import java.util.List;

import javax.faces.context.FacesContext;

import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.transaction.annotation.Transactional;

import us.gaaoc.framework.model.util.CaseRecordsCountPerDay;
import us.gaaoc.framework.webapp.backingbeans.BaseBackingBean;

public class CaseStatisticsByDay extends BaseBackingBean {

	/** Generated Serial Version UID */
	private static final long serialVersionUID = -2279533282980788054L;
	@SuppressWarnings("unused")
	private CaseRecordsCountPerDay numberOfCasesByDay;

	public List<CaseRecordsCountPerDay> getNumberOfCasesByDay() {
		List<CaseRecordsCountPerDay> caseList = this.getModelFacade()
				.countCasesByDay((String) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("courtUuid"));
		System.out.println("numberOfCasesByDay=" + caseList.get(0).getDay());
		return caseList;

	}

	public void setNumberOfCasesByDay(CaseRecordsCountPerDay numberOfCasesByDay) {
		this.numberOfCasesByDay = numberOfCasesByDay;
	}

	public String back() {
		return "back";
	}

}
